#!/bin/bash
RED_COLOR='\E[1;31m'
GREEN_COLOR='\E[1;32m'
YELLOW_COLOR='\E[1;33m'
RES='\E[0m'

cat <<EOF
1.apple
2.pear
3.banana
EOF
read -t 10 -p "请输入你想要的水果:" a

case $a in
	1)
         echo -e "${RED_COLOR}apple${RES}"
         ;;
        2)
         echo -e "${GREEN_COLOR}pear${RES}"
         ;;
        3)
         echo -e "${YELLOW_COLOR}banana${RES}"
         ;;
        *)
         echo "请输入apple|pear|banana"
         ;;
esac
